﻿
@{
    ViewData["Title"] = "诉讼档案授权";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Head{
    <style>
        div[lay-id=SuSongAuthorityTable] {
            margin: 0 10px;
        }

        #AuthorityForm {
            padding: 5px 10px;
        }

            #AuthorityForm input {
                height: 30px;
                line-height: 30px;
            }

        #daterange {
            width: 90px;
        }

        #ddlFTerm + .layui-form-select {
            width: 90px;
        }

        #AuthorityBtn {
            margin: 10px;
        }
    </style>
}
<table class="layui-table" id="SuSongAuthorityTable" lay-filter="SuSongAuthorityTable"></table>

<script type="text/html" id="toolbarDemo">
    <div class="layui-form" id="AuthorityForm">
        <div class="layui-inline">
            <input type="text" placeholder="档号" name="FileNo" class="layui-input" />
        </div>
        <div class="layui-inline">
            <input type="text" id="daterange" class="layui-input" name="txtND" placeholder="选择年度" />
        </div>
        <div class="layui-inline">
            <select class="layui-select" name="ddlFTerm" id="ddlFTerm">
                <option value="0">--期限--</option>
                <option value="1">永久</option>
                <option value="2">长期</option>
                <option value="3">短期</option>
            </select>
        </div>
        <div class="layui-inline">
            <input type="text" placeholder="立卷单位" name="txtLJDW" class="layui-input" />
        </div>
        <div class="layui-inline">
            <input type="text" placeholder="案由" name="txtAY" class="layui-input" />
        </div>
        <div class="layui-inline">
            <input type="text" placeholder="当事人" name="txtDSR" class="layui-input" />
        </div>
        <div class="layui-inline">
            <button class="layui-btn layui-btn-sm" lay-submit lay-filter="formDemo">快速检索</button>
        </div>
    </div>
    <button class="layui-btn layui-btn-sm" id="AuthorityBtn" lay-event="AuthorityBtn">阅卷授权</button>
</script>

@section scripts{
    <script>
        layui.use(['table', 'laydate', 'layer'], function () {
            var table = layui.table, laydate = layui.laydate, layer = layui.layer;
            //加载诉讼数据表格
            table.render({
                elem: '#SuSongAuthorityTable',
                height: 'full-30',
                page: true,
                toolbar: '#toolbarDemo',
                cols: [[
                    { type: 'checkbox', fixed: 'left' },
                    { field: 'FileNo', title: '档号', sort: true },
                    { field: 'FType', title: '机构/问题', sort: true },
                    { field: 'ResponsiblePerson', title: '责任者', sort: true  },
                    { field: 'ArticleNo', title: '文号' },
                    { field: 'Title', title: '案卷题名' },
                    { field: 'ArticleDate', title: '日期' },
                    { field: 'PageCount', title: '页数' },
                    { field: 'FTerm', title: '期限' },
                    { field: 'FRef', title: '盒号' },
                    { field: 'BookNum', title: '件号' },
                    { field: 'MLevel', title: '密级' }
                ]],
                data: [{ FileNo: '1', FType:'1'}]
            })
            //年范围选择器
            laydate.render({
                elem: '#daterange',
                type: 'year',
                range:true
            })
            //阅卷授权按钮
            table.on('toolbar(SuSongAuthorityTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
                if (obj.event == 'AuthorityBtn') {
                    top.layer.open({
                        type: 2,
                        title:'阅卷授权',
                        content: ['/FilesAuthority/FilesAuthority/Authority', 'no'],
                        area: ['1000px', '580px']
                    })
                }
            })
        })


    </script>


}

